A virtual tape system has a tape library and a virtual tape device. The tape library has a physical volume (referred to herein-below as “PV”) such as an electromagnetic tape for storing data. The virtual tape device has a tape volume cache (TVC) and is provided between a host and the tape library. The TVC may be realized by redundant arrays of inexpensive disks (RAID).
The virtual tape device caches data read from the tape library PV in the TVC as a logical volume (referred to herein-below as “LV”). In this way, the virtual tape system caches data in the TVC and allows the host to access the data faster by reducing operations of mount processing or un-mount processing of the PV in the tape library.
Data stored in the PV in the virtual tape system may be desirably saved outside of the tape library and used by another virtual tape device. Consequently, after the LV data stored in the PV by the virtual tape device is stored in the new PV in the virtual tape system, an export operation to carry the PV outside of the tape library is performed.
In the prior art, the virtual tape device stores a plurality of specified LVs in a PV for export in a specified order when performing the export process. Specifically, the virtual tape device writes cached LVs directly into the export PV from the TVC. The virtual tape device first reads un-cached LVs into the TVC from the PV in which the LVs are stored, and then writes the un-cached LVs to the export PV. An example of an export process on un-cached LVs will be explained with reference to FIG. 8.
FIG. 8 illustrates an example of an export process for un-cached LVs. It is assumed in this example that the specified order of the LVs to be exported is LV 901, LV 902, and LV 903. LV 901 and LV 902 are stored in PV 911, and LV 903 is stored in PV 912.
As illustrated in FIG. 8, the virtual tape device mounts the PV 911, reads the LV 901 and the LV 902 into the TVC 930 (steps S901 and S902 respectively), and writes the LV 901 and the LV 902 into an export PV 920 (steps S903 and S904 respectively). Then, the virtual tape device un-mounts the PV 911 and mounts the PV 912. The virtual tape device then reads the LV 903 from the PV 912 to the TVC 903 (step S905), and writes the LV 903 into the export PV 920 (step S906). Then, the virtual tape device un-mounts the PV 912 and the export process is finished. In this way, the virtual tape device writes the LVs to be exported into the export PV in the specified order.
However, there is a problem in the prior art in that the export process takes a long time to perform. Specifically, the virtual tape device may perform excessive mounting and un-mounting of the PVs that stores the LVs to be exported when writing the LVs to be exported to the export PV.
An export process in which excessive mounting and un-mounting is performed will be described with reference to FIGS. 9 and 10. FIG. 9 illustrates an example of performing excessive PV mounting and un-mounting in an export process, and FIG. 10 illustrates another example of performing excessive PV mounting and un-mounting in an export process.
It is assumed in the example in FIG. 9 that the specified order of the LVs to be exported is the LV 901, the LV 902, and the LV 903, and the LV 901 and the LV 902 are stored in the PV 911, and the LV 903 is stored in the PV 912 in the same way as FIG. 8. Moreover, it is assumed that the LV 903 is already cached in the TVC 930 and the TVC 930 is full.
As illustrated in FIG. 9, the virtual tape device loads the PV 911, but the LV 903 is removed from the TVC 930 (step S910) before reading the LV 901 and the LV 902 into the TVC 930 (steps S911 and S912 respectively). The virtual tape device then writes the LV 901 and the LV 902 into the export PV 920 (step S913 and S914 respectively).
Next, the virtual tape device un-mounts the PV 911 and mounts the PV 912. The virtual tape device then reads the LV 903 from the PV 912 to the TVC 930 (step S915), and writes the LV 903 into the export PV 920 (step S916). Then, the virtual tape device unloads the PV 912 and the export process is finished.
In this way, the virtual tape device executes excessive mounting and un-mounting of the PV 912 since the LV 903 to be exported and that is already cached is removed from the TVC 930 when reading the LV 901 and the LV 902.
It is assumed in the example in FIG. 10 that the specified order of the LVs to be exported is the LV 901, the LV 903, and the LV 902, and the LV 901 and the LV 902 are stored in the PV 911, and the LV 903 is stored in the PV 912. Moreover, the LV 901, the LV 903, and the LV 902 are all un-cached.
As illustrated in FIG. 10, the virtual tape device mounts the PV 911, reads the LV 901 into the TVC 930 (step S920), and writes the LV 901 into the export PV 920 (step S921). Then, the virtual tape device un-mounts the PV 911 and mounts the PV 912. The virtual tape device then reads the LV 903 from the PV 912 to the TVC 930 (step S922), and writes the LV 903 into the export PV 920 (step S923).
Then, the virtual tape device un-mounts the PV 912 and mounts the PV 911. The virtual tape device then reads the LV 902 from the PV 911 to the TVC 930 (step S924), and writes the LV 902 into the export PV 920 (step S925). In this way, the virtual tape device mounts and un-mounts the PV 911 twice.
Japanese Laid-open Patent Publication Nos. 5-73221 and 2011-123834 are examples of related art.